package com.zjy.service.impl;

import com.zjy.bean.Address;
import com.zjy.dao.AddressMapper;
import com.zjy.service.AddressService;
import com.zjy.utils.UUIDUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by Administrator on 2019/5/18.
 */
@Service
public class AddressServiceImpl implements AddressService{
    @Resource
    private AddressMapper addressMapper;

    @Override
    public void addAddress(Address address) {
        address.setId(UUIDUtils.getUUID());
        addressMapper.insertSelective(address);
    }

    @Override
    public int deleteAddressById(String addressId) {
        return addressMapper.deleteAddressById(addressId);
    }
}
